﻿@model BrnMall.Web.StoreAdmin.Models.PrintOrderModel
@{ 
    Layout = null;
}
<script src='http://@ViewData["JSIP"]/CLodopfuncs.js'></script>
<script src='/admin_store/scripts/jquery.js'></script>
<script src='/admin_store/scripts/printfile.js'></script>
<script type="text/javascript">
    window.onload = function () {
        getTableContent();
        setTimeout('', 1000);
        LODOP = getCLodop();
        if (LODOP.webskt && LODOP.webskt.readyState == 1) {
            @{ 
                Model.RegionInfo = Model.RegionInfo == null ? new RegionInfo() : Model.RegionInfo;
            }
            for (var i = 0; i < arrays4.length; i++) {
                if (arrays4[i].split(',')[1] == 80) {
                    Print2('@Model.OrderInfo.StoreName', '@Model.OrderInfo.Mobile','@Model.OrderInfo.OrderState', '@Model.OrderInfo.AddTime', arrays, arrays2, arrays3, '@Model.OrderInfo.OrderAmount', '@Model.OrderInfo.Discount',
                '@Model.OrderInfo.SurplusMoney', '企动小程序', '@Model.OrderInfo.Consignee', '@Model.OrderInfo.Mobile', '@Model.RegionInfo.CityName' + '@Model.RegionInfo.Name' + '@Model.OrderInfo.Address',
                '@Model.OrderInfo.OSN', '@CommonHelper.GetDateTime()')
                    LODOP.SET_PRINT_MODE("NOCLEAR_AFTER_PRINT", true);//设置打印完毕不清理打印信息
                    LODOP.SET_PRINTER_INDEXA(arrays4[i].split(',')[0]);
                    //PrintWaitLoop();
                    PrintWait()
                } else if (arrays4[i].split(',')[1] == 60) {
                    Print('@Model.OrderInfo.StoreName', '@Model.OrderInfo.Mobile', '@Model.OrderInfo.OrderState', '@Model.OrderInfo.AddTime', arrays, arrays2, arrays3, '@Model.OrderInfo.OrderAmount', '@Model.OrderInfo.Discount',
                '@Model.OrderInfo.SurplusMoney', '企动小程序', '@Model.OrderInfo.Consignee', '@Model.OrderInfo.Mobile', '@Model.RegionInfo.CityName' + '@Model.RegionInfo.Name' + '@Model.OrderInfo.Address',
                '@Model.OrderInfo.OSN', '@CommonHelper.GetDateTime()')
                    LODOP.SET_PRINT_MODE("NOCLEAR_AFTER_PRINT", true);//设置打印完毕不清理打印信息
                    LODOP.SET_PRINTER_INDEXA(arrays4[i].split(',')[0]);
                    //PrintWaitLoop();
                    PrintWait()
                }
            }
        }
    }
</script>
<input type="hidden" id="T12A" value="" size="60" /><br />
<input type="text" id="T12B" value="" size="60" /><br />
@*<textarea id="T9" rows="6" cols="45">
</textarea>*@
<table id="mytable" style="display:none">
    @foreach (OrderProductInfo opi in Model.OrderProductList)
    {
        <tr>
            <td>@opi.Name</td>
            <td>@opi.RealCount</td>
            <td>@opi.ShopPrice</td>
        </tr>
    }
</table>
<table id="myprint" style="display:none">
    @foreach (PrintConfig pc in Model.PrintConfigList) {
        <tr>
            <td>@pc.PrintID</td>
            <td>@pc.PrintFormat</td>
        </tr>
    }
</table>
